package compro.admission.form.email;

import compro.admission.form.entity.Application;
import compro.admission.form.entity.User;

public class ResetApproveEmail extends EmailTemplate{
	Email email;
	User user;
	Application application;
	
	public ResetApproveEmail(User user,Application application) {
		super(new Email());
		this.user = user;
		this.application = application;
		setEmailContent();
	}

	public Application getApplication() {
		return application;
	}

	public void setApplication(Application application) {
		this.application = application;
	}

	@Override
	public void setEmailContent() {
		super.getEmail().setToEmail(user.getEmail());
		super.getEmail().setSubject("Approve for the Reqeust to Reset Application ID : " + application.getId());

		String content = "Hi "+user.getFirstname() + ","; 
		content += "\n\n";
		content += "Your request is now approved.\n";
		content += "Information Summary:\n";
		content += "Name: " + user.getFirstname() + " " + user.getLastname() + "\n";
		content += "Application ID: " + application.getId() + "\n";
		content += "Application Status: " + application.getDisposition() + "\n";
		content += "\n";
		content += "Best Regards,\n";
		content += "Admission Staff\n";
		content += "Maharishi University of Management";
		content += "\n\n";

		super.getEmail().setMailText(content);
		
	}

}
